<?php
/**
 * Source code of TestController class controller
 * @category puntoengine
 * @package servlets
 * @author Juan Benavides Romero <juan.benavides.romero@gmail.com>
 * @since 0.1.1
 */


/**
 * TestController is a controller class of the many examples
 * @category puntoengine
 * @package servlets
 * @author Juan Benavides Romero <juan.benavides.romero@gmail.com>
 * @since 0.2
 */
class TestController extends HttpServlet {
	/**
     * MasterPage base for this example page
	 * @var string
	 * @since 0.2
     */
    protected $master = '/template/test/master.php';
    
    /**
     * Implement the GET method connection
     * @param HttpRequest $request Page request
	 * @since 0.2
     */
    protected function doGet(HttpRequest $request) {
		if($request->getParam('type') == 'content') {
			$this->addTemplateSection('content', 'dinamic content generated from code');
		} else if($request->getParam('type') == 'dinamicrequest') {
			$request->addParam('value', 'dinamic generated value');
		}
    }//doGet
	
	
	
	protected function defaultAction() {
		echo 'default';
	}
	
	protected function otherAction() {
		echo 'other';
	}
}//HomeController
?>